Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
MEOCloud api wrapper.
npm install meocloud --save
var config = {
oauth: {
consumer_key: 'xxxxxxxxxxxxxx',
consumer_secret: 'xxxxxxxxxxxx',
token: 'xxxxxxxxxxxxxx',
token_secret: 'xxxxxxxxxxxxxx';
},
root: 'meocloud', // or sandbox
noSSL: true // default: false
}
var meocloud = require('meocloud')(config);
var meocloud = require('meocloud')(config);
var params = {
query: 'my_search_term'
};
meocloud.search('/', params, function(err, data, status) {
console.log(err, data, status);
});
There's two ways to make file uploads.
The first way, uses a helper method that takes care of all the details for you. If you don't need much flexibility, just use this:
var meocloud = require(meocloud)(config);
var params = {}; // add here only the MEOCloud API params
meocloud.upload('/file/to/upload.txt', '/new/file/path.txt', params, function(err, data, status) {
console.log(err, data, status);
});
The second one, gives you enough flexibility to adapt to your project, but requires you to provide all the code to deal with files, and returns the request object so you can add event listeners to control the progress or whatever. Here's an example:
var meocloud = require('meocloud')(config);
var fs = require('fs');
fs.stat('/file/to/upload.txt', console.log(err, stat) {
if (err) { throw err; }
var fstream = fs.createReadStream('/file/to/upload.txt');
var params = { overwrite: true };
meocloud.putFile('/new/file/path.txt', fstream, stat.size, params, function(err, data, status) {
console.log(err, data, status);
});
});
These are the arguments sent to every callback passed to this lib:
err
(object) if an error occurred, this param will existdata
(object) the parsed JSON object from the API responsestatus
(integer) the http status returned from the API responsepath
(string) the path the file / folder to retrieve info fromparams
(hash) the params to send in the GET URI
file_limit
limit the number of files to list (if path
is a folder)hash
if you need to check for file changeslist
true
if you want to list files inside the folder, false
otherwiseinclude_deleted
true
if you want to list deleted filesrev
if you want a specific version of the file/foldercb
(function) the callback functionshareID
(string) the ID of the shared file (returned by the API when sharing)path
(string) the path to the shared fileparams
(hash) the params to send in the request
file_limit
the limit of files to be listedcb
(function) the callback functioncb
(function) the callback functionparams
(hash) the params to send in the request
shareid
the ID of the file share (required)cb
(function) the callback functionpath
(string) the path to get all shares fromcb
(function) the callback functionpath
(string) the path of the file/folder to shareparams
(hash) the params to send in the request
to_email
the email of the user to share the folder with (required)cb
(function) the callback functioncb
(function) the callback functionpath
(string) the path of the file to fetch the thumbnailparams
(hash) the params to send in the request
format
the format of the thumb image file (png
or jpeg
)size
the size of the thumbnail (xs
, s
, m
, l
, xl
)cb
(function) the callback functionpath
(string) the path where to start the searchparams
(hash) the params to send in the request
query
the term to search for (required)mime_type
the mime type of the files to search forfile_limit
the number of files to returninclude_deleted
true
if it should search for deleted filescb
(function) the callback functionpath
(string) path to the file/folderparams
(hash) the params to send in the request
rev_limit
the number of revisions to returncb
(function) the callback functionpath
(string) path of the deleted file/folder to restoreparams
(hash) the params to send in the request
rev
the revision to restore the file to (required)cb
(function) the callback functionpath
(string) path of the file/folder to get the media fromparams
(hash) the params to send in the request
download_fallback
true if you want to revert to download on failureprotocol
the streaming protocol (hls
, rtmp
, rtsp
, ss
)cb
(function) the callback functionpath
(string) the path of the file to get/downloadparams
(hash) the params to send in the request
rev
revision of the version of the file to getcb
(function) the callback functionpath
(string) the path where the file will be savedfileStream
(readable stream) the stream of the file to be uploadedfileSize
(integer) the size, in bytes, of the file to be uploadedparams
(hash) the params to send in the request
overwrite
true
if you want to overwrite an already existing file path (requires parent_rev)parent_rev
if you want to overwrite, add the latest rev of the file (requires overwrite)cb
(function) the callback functionorigin
(string) the path of the file to be uploadeddestination
(string) the path where the file will be savedparams
(hash) the params to send in the request
overwrite
true
if you want to overwrite an already existing file path (requires parent_rev)parent_rev
if you want to overwrite, add the latest rev of the file (requires overwrite)cb
(function) the callback functionparams
(hash) the params to send in the request
cursor
only changes after this cursor will be listedcb
(function) the callback functionparams
(hash) the params to send in the request
root
choose meocloud
or sandbox
. default is meocloud
.from_path
origin path of the file / folder (required)to_path
destination path of the file / folder (required)from_copy_ref
a reference to a shared file from other usercb
(function) the callback functionpath
(string) path to the filecb
(function) the callback functionparams
(hash) the params to send in the request
path
the path of the file / folder to remove (required)root
choose meocloud
or sandbox
. default is meocloud
.cb
(function) the callback functionparams
(hash) the params to send in the request
from_path
the path of the file / folder to move (required)to_path
the destination path of the file / folder to move (required)root
choose meocloud
or sandbox
. default is meocloud
.cb
(function) the callback functionparams
(hash) the params to send in the request
path
the path of the new folder (required)root
choose meocloud
or sandbox
. default is meocloud
.cb
(function) the callback functionpath
(string) the path of the file / folder to recoverparams
(hash) the params to send in the request
root
choose meocloud
or sandbox
. default is meocloud
.cb
(function) the callback functioncb
(function) the callback functionCopyright (c) 2013 Rogério Vicente. Licensed under the MIT license.
FAQs
MEOCloud api wrapper (http://meocloud.pt)
The npm package meocloud receives a total of 1 weekly downloads. As such, meocloud popularity was classified as not popular.
We found that meocloud demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.